<?php
$this->pageTitle=Yii::app()->name;?>

<center>
<h3>Administrator Dashboard</h3>
<!--<img src="images/adminmenu.png" align="center"><br><br>-->
<a href="index.php?r=project/index"><img src="images/project.png" onmouseover="this.src='images/project1.png'" onmouseout="this.src='images/project.png'"></a>
<a href="index.php?r=testimonials/index"><img src="images/testimonials.png" onmouseover="this.src='images/testimonials1.png'" onmouseout="this.src='images/testimonials.png'"></a>
<a href="index.php?r=picture/index"><img src="images/picture.png" onmouseover="this.src='images/picture1.png'" onmouseout="this.src='images/picture.png'"></a>
<a href="index.php?r=pricequote/index"><img src="images/requests.png" onmouseover="this.src='images/requests1.png'" onmouseout="this.src='images/requests.png'"></a>
<br> 
<a href="index.php?r=guestbook/index"><img src="images/guestbook.png" onmouseover="this.src='images/guestbook1.png'" onmouseout="this.src='images/guestbook.png'"></a>
<a href="index.php?r=users/index"><img src="images/user.png" onmouseover="this.src='images/user1.png'" onmouseout="this.src='images/user.png'"></a>
<a href="index.php?r=property/index"><img src="images/property.png" onmouseover="this.src='images/property1.png'" onmouseout="this.src='images/property.png'"></a>
<a href="index.php?r=emailBlast/index"><img src="images/email.png" onmouseover="this.src='images/email1.png'" onmouseout="this.src='images/email.png'"></a>
<br>
<table cellspacing=15>
<tr><td width=200><h4><b><font color=#d60c0c><center>Viewed Projects</center></font></b></h4>
<?php 
$projectmv = Project::model()->mostViewed()->findAll();
$i=1;
foreach($projectmv as $projectmvVal){
	echo $i.'. '.$projectmvVal->name.' ['.$projectmvVal->views.']<br>';
	$i++;
}
?>
</td>
<td width=200><h4><b><font color=#d60c0c><center>Viewed Properties</center></font></b></h4>
<?php 
$propertymv = Property::model()->mostViewed()->findAll();
$i=1;
foreach($propertymv as $propertymvVal){
	echo $i.'. '.$propertymvVal->unit_number.' ['.$propertymvVal->views.']<br>';
	$i++;
}
?>
</td>
<br>
<br>
<td width=200><h4><b><font color=#d60c0c><center>Requested Properties</center></font></b></h4>
<?php 
$propertymr = Property::model()->mostRequested()->findAll();
$i=1;
foreach($propertymr as $propertymrVal){
	echo $i.'. '.$propertymrVal->unit_number.' ['.$propertymrVal->views2.']<br>';
	$i++;
}
?>
</td></tr>

</table>
<!--a href="#" class="button">New request for price quote notification <font color=red>here.</font></a-->
<?php
echo CHtml::link('Guestbook Entries: '.$count.' unread', array('notification/index'),array('class'=>'buttonOld'));
echo '       |         ';
echo CHtml::link('Price Quote Requests: '.$countp.' unread', array('notificationp/index'),array('class'=>'buttonOld'));

?>
<br>
<!--a href="#" class="button">New guestbook entry <font color=red>here.</font></a-->
<!--frontpage menu--!>
<!--frontpage menu--!>